/* Modern Product Image Gallery Redesign */

/* Reset and base styles */
* {
  box-sizing: border-box;
}

/* Main image wrapper - no styling */

/* Main product image container */
.p-image {
  position: relative;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}



/* Main image link and image styling with shine effect */
.p-main-image {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  height: 100%;
}

.p-main-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, 
    rgba(200, 200, 200, 0.4) 0%,
    rgba(220, 220, 220, 0.6) 25%,
    rgba(240, 240, 240, 0.8) 50%,
    rgba(220, 220, 220, 0.6) 75%,
    rgba(200, 200, 200, 0.4) 100%
  ) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.p-main-image::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 100%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.5) 52%,
    rgba(255, 255, 255, 0.3) 54%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 2;
  pointer-events: none;
}

.p-main-image:hover::before {
  transform: translateX(200%);
}

.p-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  filter: contrast(1.05) saturate(1.1);
}

.p-main-image:hover img {
  filter: contrast(1.08) saturate(1.15) brightness(1.02);
}

/* Premium "New" flag styling */
.flags {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.flag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #4a90e2 0%, #5a6acf 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: flagPulse 2s ease-in-out infinite;
}

@keyframes flagPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4); }
}

/* Thumbnail section redesign */
.p-thumbnails-wrapper {
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.p-thumbnails {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.p-thumbnails-inner {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  align-items: center;
}

/* Individual thumbnail styling */
.p-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  cursor: pointer;
}

.p-thumbnail:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(74, 144, 226, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.p-thumbnail.highlighted {
  border-color: #4a90e2;
  background: rgba(74, 144, 226, 0.1);
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.p-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  filter: contrast(1.05);
}

.p-thumbnail:hover img {
  filter: contrast(1.08) saturate(1.08);
}

/* Navigation arrows for thumbnails - no styling */

/* Responsive design */
@media (max-width: 768px) {

  
  .p-thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .flag {
    font-size: 0.6rem;
    padding: 0.4rem 0.8rem;
  }

}



/* Enhanced focus states for accessibility */
.p-thumbnail:focus,
.p-main-image:focus {
  outline: 3px solid rgba(74, 144, 226, 0.5);
  outline-offset: 2px;
}

/* Smooth loading state */
.p-thumbnail img[loading="lazy"],
.p-main-image img[loading="eager"] {
  transition: opacity 0.3s ease;
}

.p-thumbnail img[loading="lazy"]:not([src]),
.p-main-image img[loading="eager"]:not([src]) {
  opacity: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}